import {createRouter, createWebHashHistory} from 'vue-router';
export const frameRoutes =[
    {
        title: "停车场管理",
        path: 'ParkingSpot',
        name: 'ParkingSpot',
        component: () => import("../pages/frame/ParkingSpot.vue"),
    },
    {
        title: "交通管理",
        path: 'TrafficManage',
        name: 'TrafficManage',
        component: () => import("../pages/frame/TrafficManage.vue"),
    },
    {
        title: "出行指引",
        path: 'TravelGuide',
        name: 'TravelGuide',
        component: () => import("../pages/frame/TravelGuide.vue"),
    },
    {
        title: "极端天气",
        path: 'ExtremeWeather',
        name: 'ExtremeWeather',
        component: () => import("../pages/frame/ExtremeWeather.vue"),
    },
    {
        title: "自行车租赁",
        path: 'BicycleRental',
        name: 'BicycleRental',
        component: () => import("../pages/frame/BicycleRental.vue"),
    }
]
export default createRouter({
    history: createWebHashHistory(),
    routes:  [
        {
            path: '/',
            redirect:"/Frame",
        },
        {
            path: '/Frame',
            name: 'Frame',
            redirect:"/Frame/ParkingSpot",
            component: () => import("../pages/Frame.vue"),
            children:frameRoutes
        },
        {
            path: '/Share',
            name: 'Share',
            component: () => import("../pages/Share.vue")
        }
    ]
})